private: System::Void ContextAddFrame_Click(System::Object *  sender, System::EventArgs *  e)
		 {
			 AddFrame_Click(NULL, NULL);
		 }

private: System::Void ContextDeleteFrame_Click(System::Object *  sender, System::EventArgs *  e)
		 {
			 if(AniList->SelectedIndex < 0 || FrameList->SelectedIndex < 0)
				 return;

			 int selIndex = FrameList->SelectedIndex;
			 FrameList->SelectedIndex = -1;

			 //file->DeleteFrame(AniList->SelectedIndex, FrameList->SelectedIndex);
			 ((AnimObject*)AniList->SelectedItem)->DeleteFrame(selIndex);

			 FrameList->DataSource = NULL;
			 FrameList->DataSource = ((AnimObject*)AniList->SelectedItem)->frames;

			 /*BindingManagerBase *bm = this->FrameList->BindingContext[((AnimObject*)AniList->SelectedItem)->frames];
			 CurrencyManager *cm = (CurrencyManager*)bm;

			 if (cm != NULL)
				cm->Refresh();*/

			 //FrameList->Items->RemoveAt(FrameList->SelectedIndex);

			 needsSave(true);
		 }

private: System::Void ContextDeleteAllFrames_Click(System::Object *  sender, System::EventArgs *  e)
		 {
			 if(AniList->SelectedIndex < 0)
				 return;

			 FrameList->SelectedIndex = -1;
			 int numItems = FrameList->Items->Count;

			 //for(int i = 0; i < numItems; i++)
			 //{
				// //file->DeleteFrame(AniList->SelectedIndex, i);

				// ((AnimObject*)AniList->SelectedItem)->DeleteFrame(i);

				// //if(FrameList->Items->get_Count() > 0)
				//	//FrameList->Items->RemoveAt(0);
			 //}

			 ((AnimObject*)AniList->SelectedItem)->frames->Clear();

			 FrameList->DataSource = NULL;
			 FrameList->DataSource = ((AnimObject*)AniList->SelectedItem)->frames;

			 needsSave(true);
		 }